/**
 *
 * Copyright 2016 Google Inc. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

* {
  box-sizing: border-box;
}

html, body {
  padding: 0;
  margin: 0;
  background: #FAFAFA;
  font-family: Arial, sans-serif;
}

.header {
  width: 100%;
  height: 56px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
  background: #333;
  color: #FFF;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0 16px;
}

.header__menu-toggle {
  background: none;
  border: none;
  width: 24px;
  height: 24px;
  padding: 0;
  margin: 0;
  color: #FFF;
}

.side-nav {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.side-nav--visible {
  pointer-events: auto;
}

.side-nav::before {
  content: '';
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  will-change: opacity;
  transition: opacity 0.3s cubic-bezier(0,0,0.3,1);
}

.side-nav__container {
  position: relative;
  width: 90%;
  max-width: 400px;
  background: #FFF;
  height: 100%;
  box-shadow: 2px 0 12px rgba(0,0,0,0.4);
  transform: translateX(-102%);
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.side-nav--animatable .side-nav__container {
  transition: transform 0.13s cubic-bezier(0,0,0.3,1);
}

.side-nav--visible.side-nav--animatable .side-nav__container {
  transition: transform 0.33s cubic-bezier(0,0,0.3,1);
}

.side-nav--visible::before {
  opacity: 1;
}

.side-nav--visible .side-nav__container {
  transform: none;
}

.side-nav__hide {
  position: absolute;
  left: 16px;
  top: 16px;
  background: none;
  border: none;
  color: #FFF;
  width: 24px;
  height: 24px;
  padding: 0;
  margin: 0;
}

.side-nav__header {
  height: 200px;
  background: #EA2663;
  color: #FFF;
  display: flex;
  padding: 16px;
  align-items: flex-end;
  font-size: 24px;
}

.side-nav__content {
  padding-top: 32px;
  flex: 1;
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.side-nav__content li {
  height: 48px;
  line-height: 48px;
  padding: 0 16px;
}

.side-nav__content li:hover {
  background: #CCC;
}
